package com.hzhq.contract.service;

import com.hzhq.contract.bean.dto.CompanyDTO;
import com.hzhq.contract.bean.dto.DepartDTO;
import com.hzhq.contract.bean.entity.Company;
import org.springframework.data.domain.Page;
import org.springframework.data.mongodb.core.query.Query;

import java.util.List;
import java.util.Optional;


/**
 * @author: hzhq1255
 * @mail: hzhq1255@163.com
 * @date: 2021/4/15 0:11
 * @desc:
 */
public interface CompanyService {

    List<CompanyDTO> getAllList();

    Page<CompanyDTO> getAllPage(Integer currentPage, Integer pageSize);

    Page<CompanyDTO> searchAllPageByQuery(Query query, Integer currentPage, Integer pageSize);

    CompanyDTO getOneByCompanyName(String companyName);

    CompanyDTO getOneByCompanyId(String companyId);

    CompanyDTO update(CompanyDTO companyDTO);

    CompanyDTO save(CompanyDTO companyDTO);

    List<CompanyDTO> saveAll(List<CompanyDTO> companyDTOList);

    String deleteById(String companyId);

    String deleteByName(String companyName);

    List<String> deleteAll(List<String> companyIds);

    Page<CompanyDTO> searchAllPages(CompanyDTO companyDTO,Integer currentPage, Integer pageSize);


}
